The present invention relates to coding and decoding digital data, and more particularly, to such data when representing an image, especially a medical image.
Digital data representing an image usually has a large amount of redundency. Therefore, redundency reducing encoding techniques such as DPCM (delta pulse code modulation), Huffman encoding, and run length encoding are used. Such encoding techniques are most efficient when producing variable length code words in accordance with the redundency of the original data. The variable length words must be packed for transmission in a storage register. If no loss of data is to occur, the register must have a length equal to the longest possible code word. However, this results in inefficient packing for code words having less than the maximum length. If a shorter register is used, more efficient packing results, but also the loss of some data.
It is, therefore, an object of the present invention to have a coder that is both lossless and efficient in packing data, a decoder for use with the encoder, and processing apparatus using the coder and decoder.